package main;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

import org.apache.commons.io.IOUtils;

public class TruyenTuan {

	public static void main(String args[]) throws FileNotFoundException, IOException {
		System.out.println("www.truyentuan.com");
		TruyenTuan truyentuan = new TruyenTuan();
		String allEntry = truyentuan.getAllEntry();
		String array = allEntry.split("=")[1].trim();
		String[] entries = array.split("\\],\\[");
		System.out.println(entries.length);
		
		entries[0] = entries[0].substring(2);
		entries[entries.length - 1] = entries[entries.length - 1].substring(0, entries[entries.length - 1].length() - 3);
		for (String entry : entries) {
			System.out.println(entry);
		}
	}

	public String getAllEntry() throws FileNotFoundException, IOException {
		return IOUtils.toString(new FileInputStream("C:/temp/Comic/truyentuan.txt"));
	}

}
